const prefix = '/api/user_level';

module.exports = app => {
    const {router, middleware} = app;

    router.get(prefix, middleware.api(), async ctx => {
        ctx.body = await ctx.app.model.UserLevel.findAll({
            where: {id: {[ctx.app.Sequelize.Op.gt]: 1}},
            order: [['id', 'asc']]
        });
    });
};